import Vue from 'vue'
import VueRouter from 'vue-router'
const Login = () => import('@/views/login/Login.vue')
const Layout = () => import('@/views/layout/Layout.vue')
const Home = () => import('@/views/home/Home.vue')
const My = () => import('@/views/my/My.vue')
const Qa = () => import('@/views/qa/Qa.vue')
const Video = () => import('@/views/video/Video.vue')

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: Login,
    component: Login
  },
  {
    path: '/',
    component: Layout,
    children: [{
      path: '',
      name: Home,
      component: Home
    }, {
      path: '/my',
      name: My,
      component: My
    }, {
      path: '/qa',
      name: Qa,
      component: Qa
    }, {
      path: '/video',
      name: Video,
      component: Video
    }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
